[Improvement-18064][ApiServer] Update globalParams replace logic and test case#18068
[Improvement-18064][ApiServer] Update globalParams replace logic and test case#18068njnu-seafish wants to merge 5 commits intoapache:devfrom
Conversation
|
ruanwenjun
left a comment
There was a problem hiding this comment.
It's better to use a utils to do this, the calculate logic also exist in master.
I think we should use a table to store some of the runtime context of workflow instances, such as parameters.(This can be a final solution)
Sure, I'll wait until the other PRs are merged before fixing this one to avoid conflicts. |
# Conflicts: # dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkflowInstanceServiceImpl.java
The table currently stores placeholders that have not yet been replaced with actual values. Additionally, the placeholders must be substituted based on the actual execution time. mysql> select * from t_ds_workflow_instance order by start_time desc limit 1 \G; command_param: {"commandType":"START_PROCESS","subWorkflowInstance":false,"startNodes":[],"commandParams":[{"prop":"a","direct":"IN","type":"VARCHAR","value":"11"},{"prop":"b","direct":"IN","type":"VARCHAR","value":"2"},{"prop":"c","direct":"IN","type":"VARCHAR","value":"$[yyyyMMdd]"},{"prop":"d","direct":"IN","type":"VARCHAR","value":"4"},{"prop":"e","direct":"IN","type":"VARCHAR","value":"$[yyyyMMdd+1]"}],"timeZone":"GMT+08:00"} global_params: [{"prop":"a","direct":"IN","type":"VARCHAR","value":"11"},{"prop":"b","direct":"IN","type":"VARCHAR","value":"2"},{"prop":"c","direct":"IN","type":"VARCHAR","value":"$[yyyyMMdd]"},{"prop":"d","direct":"IN","type":"VARCHAR","value":"4"},{"prop":"e","direct":"IN","type":"VARCHAR","value":"$[yyyyMMdd+1]"}] |




Was this PR generated or assisted by AI?
NO
Purpose of the pull request
close #18064
Brief change log
Update globalParams replace logic and test case
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
Pull Request Notice
Pull Request Notice
If your pull request contains incompatible change, you should also add it to
docs/docs/en/guide/upgrade/incompatible.md